﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace WordpressRestApi
{
    /// <summary>Asynchronous enumerator.</summary>
    /// <typeparam name="T">Type of element.</typeparam>
    public interface IAsyncEnumerator<out T>
    {
        /// <summary>Returns the current batch.</summary>
        /// <remarks>Batch of elements.</remarks>
        IEnumerable<T> CurrentBatch { get; }

        /// <summary>Moves to the next batch.</summary>
        /// <returns><c>true</c> iif there is a new batch available.</returns>
        Task<bool> MoveNextAsync();
    }
}
